<template>
  <el-form ref="form" :model="form" label-width="120px">
    <el-form-item label="新建文件夹名：">
      <el-input v-model="form.fileName"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">确认</el-button>
      <el-button @click="closeDialog">取消</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
import { addFolder } from "../../../../api/resource/info";

export default {
  name: "AddFolderEdit",
  props: ["parentId"],
  data(){
    return{
      form:{},
      fileName: ""
    }
  },
  methods: {
    onSubmit() {
      this.form.parentId = this.parentId
      addFolder(this.form).then(response => {
        this.$emit("close-dialog1",false);
      });
      this.$emit("close-dialog1",false);
    },
    closeDialog() {
      this.$emit("close-dialog1",false)
    }
  },
}
</script>

<style scoped>

</style>
